package map.gui.util;

import java.io.File;
import java.io.FileFilter;

public class CodeFileFilter implements FileFilter {

	public boolean accept(File f) {
	    if (f.isDirectory()) {
		return true;
	    }

	    String extension = Utils.getExtension(f);
	    if (extension != null) {
	    	boolean eq=false;
	    	for(int i=0; i<Utils.extensions.length;i++)
	    		if(extension.equals(Utils.extensions[i]))
	    			eq=true;
		        return eq;
	    }
	    return false;
	}

	 //The description of this filter
    public String getDescription() {
        return "Just Texts";
    }
}
